package com.atguigu.gmall.ums.api;

import com.atguigu.gmall.common.bean.ResponseVo;
import com.atguigu.gmall.ums.entity.UserAddressEntity;
import com.atguigu.gmall.ums.entity.UserEntity;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface UmsApi {
    @GetMapping("ums/user/{id}")
    @ApiOperation("详情查询")
    public ResponseVo<UserEntity> queryUserById(@PathVariable("id") Long id);
    @ApiOperation("根据用户id查询地址列表")
    @GetMapping("ums/useraddress/queryUserAddressesByUserId/{userId}")
    public ResponseVo<List<UserAddressEntity>> queryUserAddressesByUserId(
            @PathVariable("userId") String userId
    );
    @ApiOperation(("查询用户数据"))
    @GetMapping("ums/user/query")
    public ResponseVo query(@RequestParam(value = "loginName",required = true) String loginName,
                            @RequestParam(value = "password",required = true) String password);
}
